-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: First pass downloadMany #1945
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid just had a couple questions & request for method docs
public void downloadBlobs() {} | ||
public void downloadBlobs() throws IOException { | ||
TransferManagerConfig config = | ||
TransferManagerConfig.newBuilder().setAllowChunking(false).setMaxWorkers(1).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't setAllowChunking false by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is, can remove that.
|
||
@Override | ||
public DownloadResult call() throws Exception { | ||
// TODO: Check for chunking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the plan here? To check setAllowChunking
, and decide whether to download byte stream ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we would check allowChunking from the ParallelDownloadConfig first to ensure that the customer is allowing us to chunk downloads on their behalf, then we would check the file size to see if we want to do direct or chunked download.
@@ -56,6 +56,14 @@ public TransferManagerImpl(TransferManagerConfig transferManagerConfig) { | |||
|
|||
@Override | |||
public @NonNull DownloadJob downloadBlobs(List<BlobInfo> blobs, ParallelDownloadConfig opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs will be a followup, just getting first passes out first.
Overall the implementation looks good to me. I will leave it to the Java experts to look more closely at the specifics. |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.